#include <map>
#include <vector>
#include <string>
#include <deque>
#include "Ogre.h"
#include "al.h"

#include "Sound.h"

#pragma once

namespace UniverseSound
{
	typedef std::map<std::string, SoundClip*> SoundMap;
	typedef std::map<std::string, ALuint> EffectList;
	typedef std::map<ALenum, bool> FeatureList;
	typedef std::vector<SoundClip*> ActiveSoundList;
	typedef std::vector<ALuint> SourceList;

	// Structure defining threaded file opening
	struct threadedFileOpen
	{
		bool mPrebuffer;
		Ogre::DataStreamPtr mFile;
		Ogre::String mFileName;
		ALuint mBuffer;
		SoundClip *mSound;
	};

	// Structure defining a static shared audio buffer
	struct sharedAudioBuffer
	{
		ALuint mAudioBuffer;
		unsigned int mRefCount;
	};

	typedef std::deque<threadedFileOpen*> FileOpenList;
	typedef std::map<std::string, sharedAudioBuffer*> SharedBufferList;

	// Enumeration defining the actions possible if a file is loaded
	enum ONLOAD_ACTION
	{
		ONLOAD_PLAY,
		ONLOAD_PAUSE,
		ONLOAD_STOP
	};
}